<template>
	<view class="roo">
		<web-view fullscreen="false"
			src="http://10-3-0-1.vpn.ccufe.edu.cn:3030/TMWeb/TimetableSearch/TimetableSearchClassSpan.aspx"></web-view>
		<!-- <iframe src="http://10-3-0-1.vpn.ccufe.edu.cn:3030/TMWeb/TimetableSearch/TimetableSearchClassSpan.aspx" style="width:2560px;height:764px;" frameborder="0"></iframe> -->
	</view>
</template>

<script>
	// import PanZoom from 'vue-panzoom'
	var wv; //计划创建的webview
	export default {
		data() {
			return {
				wSetting: {
					width: '1920px',
					height: '1080px'
				}
			};
		},
		onReady() {
			//设置userAgent代理
			plus.navigator.setUserAgent(
				"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
				);
			// #ifdef APP-PLUS
			var currentWebview = this.$scope.$getAppWebview() //获取当前页面的webview对象
			setTimeout(function() {
				wv = currentWebview.children()[0]
				// console.log(wv);
				wv.setStyle({
						scalable: true,
					}),
					wv.evalJS(`
				alert("双指缩放")
				var metaEl = document.createElement('meta')
				metaEl.setAttribute('name','viewport')
				metaEl.setAttribute('content', 'width=1920px, initial-scale=1,user-scalable=yes')
				document.head.appendChild(metaEl)
				`)
			}, 1000); //如果是页面初始化调用时，需要延时一下
			// #endif

		},
	}
</script>

<style lang="scss">
	.roo {
		padding: 10px;
		overflow: scroll;
		width: 2560px;
		height: 1080px;
	}
</style>